package com.sunyard.pcc.common.bo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: Hewei
 * @Description:
 * @Date: Created in 10:55 2018/3/6
 */
@Data
@Accessors(chain = true)
public class SysMenuBO implements Serializable{

    private static final long serialVersionUID = 6910970088338388411L;


    /**
     * 功能id
     * sys_menu.id
     */
    private Long id;

    /**
     * 菜单名称
     * sys_menu.menu_name
     */
    private String menuName;

    /**
     * 菜单类型 0 主目录 1 url
     * sys_menu.menu_type
     */
    private Integer menuType;

    /**
     * 父级菜单编号  0表示为主目录
     * sys_menu.parent_menu_id
     */
    private Long parentMenuId;

    /**
     * 菜单URL
     * sys_menu.url
     */
    private String url;

    /**
     * url方法 get post batch等
     * sys_menu.method
     */
    private String method;

    /**
     * 授权标识
     * sys_menu.perms
     */
    private String perms;

    /**
     * 图标
     * sys_menu.icon
     */
    private String icon;

    /**
     * 排序号
     * sys_menu.sort
     */
    private Integer sort;

    /**
     * 是否已删除 0 未删除 1已删除
     * sys_menu.is_deleted
     */
    private Integer isDeleted;


    /**
     * 创建时间
     * sys_menu.gmt_create
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     * sys_menu.gmt_modified
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime gmtModified;


    /**
     * 该菜单下的子菜单，按钮列表
     */
    private List<SysMenuBO> childMenus;

}
